<template>
	<div class="car">
		<h1>上方组件的和是：{{sum}}</h1>
	</div>
</template>

<script>
	import { mapState } from 'vuex'
	export default {
		name:'Car',
		computed:{
			...mapState(['sum'])
		}
	}
</script>

<style scoped>
	.car{
		background-color: orange;
		padding: 20px;
	}
</style>